{extend name="extra@admin/content"}

{block name="content"}
<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="__SELF__" data-auto="true" method="post">

    {if $spec}

    {volist name='list' id='vo'}
    <div class="layui-form-item">

        <div class="layui-col-md3 text-right">{$vo.title}&nbsp;&nbsp;</div>
        <div class="layui-col-md5">
            <input type="text" name="{$vo.id}" pattern="^[1-9]\d*$" placeholder="请输入入库数量" title="请输入入库数量" class="layui-input">
        </div>
    </div>
    <div class="hr-line-dashed"></div>

    {/volist}


    {else/}
    <div class="layui-form-item">

        <div class="layui-inline">
            <label class="layui-form-label">数量</label>
            <div class="layui-input-inline">
                <input required type="text" name="num" pattern="^[1-9]\d*$" placeholder="请输入入库数量"  title="请输入入库数量" class="layui-input">
            </div>
        </div>

    </div>
    <div class="hr-line-dashed"></div>
    {/if}

    <div class="layui-form-item text-center">
        {if isset($goods_id)}<input type='hidden' value='{$goods_id}' name='id'/>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
    <script>window.form.render();</script>
</form>
{/block}
